package cn.itcast.n3;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
@Slf4j
public class TestThread1 {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        Runnable r = () -> {
            log.debug("hello");
        };
        Thread t2 = new Thread(r, "t2");
        t2.start();

// 上面内容可以继续简化为

        Thread t1 = new Thread(() -> {
            log.debug("hello");
        }, "t2");
        t2.start();
    }
}